Optimal. Leaf size=25 \[ -\frac {1}{2} \sin ^{-1}(x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {399, 222, 385,
213} \begin {gather*} -\frac {\text {ArcSin}(x)}{2}-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 222
Rule 385
Rule 399
Rubi steps
\begin {align*} \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx &=-\left (\frac {1}{2} \int \frac {1}{\sqrt {1-x^2}} \, dx\right )+\frac {1}{2} \int \frac {1}{\sqrt {1-x^2} \left (-1+2 x^2\right )} \, dx\\ &=-\frac {1}{2} \sin ^{-1}(x)+\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right )\\ &=-\frac {1}{2} \sin ^{-1}(x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.05, size = 49, normalized size = 1.96 \begin {gather*} -\frac {1}{2} \tan ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right )-\frac {1}{2} i \tan ^{-1}\left (1-2 x^2-2 i x \sqrt {1-x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(186\) vs.
\(2(19)=38\).
time = 0.22, size = 187, normalized size = 7.48
method | result | size |
trager | \(-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (\RootOf \left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )}{2}+\frac {\ln \left (-\frac {2 \sqrt {-x^{2}+1}\, x -1}{2 x^{2}-1}\right )}{4}\) | \(57\) |
default | \(\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}-\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (1-\left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}-\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}+\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (1+\left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 110 vs.
\(2 (19) = 38\).
time = 0.50, size = 110, normalized size = 4.40 \begin {gather*} -\frac {1}{8} \, \sqrt {2} {\left (2 \, \sqrt {2} \arcsin \left (x\right ) - \sqrt {2} \log \left (\frac {1}{4} \, \sqrt {2} + \frac {\sqrt {2} \sqrt {-x^{2} + 1}}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}} + \frac {1}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}}\right ) + \sqrt {2} \log \left (-\frac {1}{4} \, \sqrt {2} + \frac {\sqrt {2} \sqrt {-x^{2} + 1}}{{\left | 4 \, x - 2 \, \sqrt {2} \right |}} + \frac {1}{{\left | 4 \, x - 2 \, \sqrt {2} \right |}}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 74 vs.
\(2 (19) = 38\).
time = 0.47, size = 74, normalized size = 2.96 \begin {gather*} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + \frac {1}{4} \, \log \left (-\frac {x^{2} + \sqrt {-x^{2} + 1} {\left (x + 1\right )} - x - 1}{x^{2}}\right ) - \frac {1}{4} \, \log \left (-\frac {x^{2} - \sqrt {-x^{2} + 1} {\left (x - 1\right )} + x - 1}{x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (x - 1\right ) \left (x + 1\right )}}{2 x^{2} - 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 118 vs.
\(2 (19) = 38\).
time = 0.83, size = 118, normalized size = 4.72 \begin {gather*} -\frac {1}{4} \, \pi \mathrm {sgn}\left (x\right ) - \frac {1}{2} \, \arctan \left (-\frac {x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right ) - \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} + 2 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} - 2 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.35, size = 85, normalized size = 3.40 \begin {gather*} -\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}-1\right )\,1{}\mathrm {i}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {2}}{2}}\right )}{4}+\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}+1\right )\,1{}\mathrm {i}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {2}}{2}}\right )}{4}-\frac {\mathrm {asin}\left (x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________